﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Xml;
using System.Xml.Serialization;
using cz.uhul.DSMLv2;
using System.ServiceModel.Channels;

namespace cz.uhul.services.DSMLv2
{
  // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
  [ServiceContract]
  //[XmlSerializerFormat(Use = OperationFormatUse.Literal, Style = OperationFormatStyle.Rpc)]
  //[XmlInclude(typeof(LdRequestDocument))]
  //[XmlInclude(typeof(LdResponseDocument))]
  public interface ILdConnection
  {




    [OperationContract(Action="*",ReplyAction="*")]
    //[OperationContract]
    //[WebInvoke(Method = "POST"
    //  ,BodyStyle = WebMessageBodyStyle.Bare
    //  ,RequestFormat = WebMessageFormat.Xml
    //  ,ResponseFormat = WebMessageFormat.Xml)]
    //[XmlInclude(typeof(LdRequestDocument))]
    //[XmlInclude(typeof(LdResponseDocument))]
    //LdResponseDocument Process(LdRequestDocument req);
    Message Process(Message reqMsg);




    //[OperationContract]
    //void Store(DsmlBatchRequest bt);



    //[OperationContract]
    //DsmlBatchResponse GetResponse();

  }




  //[MessageContract(IsWrapped = false)]
  ////[MessageContract(WrapperName = "batchRequest")]
  ////[XmlInclude(typeof(LdRequestDocument))]
  //public class DsmlBatchRequest
  //{
  //  //private LdRequestDocument _req = null;

  //  [MessageBodyMember]
  //  //[XmlElement(ElementName = "batchRequest")]
  //  //public object request
  //  //{
  //  //  get { return _req; }
  //  //  set { _req = LdRequestDocument.Parse(value); }
  //  //}
  //  public XmlElement request;
  //}





  //[MessageContract(IsWrapped=false)]
  ////[MessageContract(WrapperName = "batchResponse")]
  ////[XmlInclude(typeof(LdResponseDocument))]
  //public class DsmlBatchResponse
  //{
  //  [MessageBodyMember]
  //  //[XmlElement(ElementName = "batchResponse")]
  //  //public object response;
  //  public XmlElement response;
  //}











}
